feat: Add delete chat button with VS Code dialog confirmation#185
Open
turbolego wants to merge 2 commits into
Open
feat: Add delete chat button with VS Code dialog confirmation#185turbolego wants to merge 2 commits into
turbolego wants to merge 2 commits into
Conversation
- Add trash can emoji button (🗑️) to chat header for deleting current conversation - Use VS Code's showWarningMessage API with modal dialog for confirmation - Implements deleteCurrentChat() handler in llama-webview-provider - Shows chat name in confirmation dialog and provides user feedback - Properly integrates with persistence layer to remove chat from history - Clears UI after successful deletion Fixes issue where chat history accumulates tokens, consuming context window. Users can now easily manage and delete old conversations to free up context.
030ae47 to
721a609
Compare
- Add trash can emoji button (🗑️) in AgentView header - Implement deleteCurrentChat handler in llama-webview-provider - Implement deleteCurrentChat method in ChatService with logging - Delete current chat with confirmation from persistence - Clear chat view after successful deletion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds a delete chat button to the llama-vscode extension to help users manage conversation history and free up context window tokens.
Changes
showWarningMessageAPI with modal dialog for user confirmationdeleteCurrentChat()handler in llama-webview-providerProblem Solved
Chat history accumulates tokens in memory on each message exchange. This causes the context window to fill up faster, leaving less room for model generation. Users can now easily delete old conversations to reclaim context tokens.
Testing
Files Changed
ui/src/components/AgentView.tsx: Added delete button and handlersrc/llama-webview-provider.ts: AddeddeleteCurrentChat()methodpackage-lock.json: Updated dependenciesRelated Issues
This addresses the context window consumption problem where chat history accumulates tokens unnecessarily.